<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Travel Dream - Home</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
<div id="maincontainer">
<h:form>
<p:commandLink style="float: right;"  action="#{logoutBean.logout}" value="Logout" />
</h:form>
  <div id="menu">
    <div>
    <h:form>
    	<ul>
    		<li><a href="home.xhtml">HOME</a></li>
    		<li>
				<p:commandLink id="tutti_i_viaggi" action="#{PackageMgr.goToAllTravels()}" value="TUTTI I VIAGGI" /> 
			</li>
    		<li>
					<p:commandLink id="il_mio_profilo" action="#{UserMgr.getUserAndAddress()}" value="IL MIO PROFILO" />   
			</li>
    	</ul>
    	</h:form>
    </div>
  </div>
  <div id="right_column">
<h:form>  
<p:dataGrid var="f" value="#{PersonalizeMgr.currentFlights}" columns="1" rows="4"  paginator="true">
   	<p:panel>
   		<h:panelGrid columns="2">
   			<h:outputLabel for="departureCity" value="Città di partenza:" />
          	<h:outputText value="#{f.departureCity}" />
          	
          	<h:outputLabel for="departureAirport" value="Aeroporto di partenza:" />
          	<h:outputText value="#{f.departureAirport}" />
          	
          	<h:outputLabel for="arrivalCity" value="Città di arrivo:" />
         	<h:outputText value="#{f.arrivalCity}" />
         	
         	<h:outputLabel for="arrivalAirport" value="Aeroporto di arrivo:" />
         	<h:outputText value="#{f.arrivalAirport}" />
         	
         	<h:outputLabel for="departureDate" value="Data di partenza:" />
        	<h:outputText value="#{f.departureDate}" />
        	
        	<h:outputLabel for="price" value="Prezzo:" />
        	<h:outputText value="#{f.price}" />      
        	       		
        	<h:outputLabel for="seat" value="Posto:" />          		
        	<h:outputText value="#{f.seat}" />
   		</h:panelGrid>
   		<p:commandButton value="Seleziona questo volo" action="#{PersonalizeMgr.addFlight(f)}" />
   		<p:commandButton value="Rimuovi il volo selezionato" action="#{PersonalizeMgr.removeFlight(f)}" />
   		
   		
   	</p:panel>
   </p:dataGrid>
   <p:commandButton value="Non ci sono abbastanza voli, cerca un altro pacchetto!" action="#{PersonalizeMgr.goToHome()}"/> <p:commandButton value="Continua la personalizzazione!" action="#{PersonalizeMgr.seeBookedFlight()}"/>
</h:form>
</div>
 </div>
</h:body>
</html>